

#ifndef TRANSPARENT_TRANSPORT_SERVICE_H__
#define TRANSPARENT_TRANSPORT_SERVICE_H__

#ifdef __cplusplus
extern "C"  {
#endif      /* __cplusplus */

/* Add Includes here */
#include <profile_server.h>
#include <simple_ble_config.h>


#define TTS_SERVICE_UUID        0x0001
//#define TTS_CHAR_VAL_UUID            0x0004
//#define TTS_CHAR_TX_UUID             0x0002
//#define TTS_CHAR_RX_UUID             0x0003 

#define TTS_CHAR_VAL_UUID       0xab, 0x62, 0xec, 0x32, 0x2e, 0x3d, 0x8a, 0x8e, 0x53, 0x42, 0x51, 0xe7, 0x04, 0x00, 0xe3, 0xf5
#define TTS_CHAR_TX_UUID       0xab, 0x62, 0xec, 0x32, 0x2e, 0x3d, 0x8a, 0x8e, 0x53, 0x42, 0x51, 0xe7, 0x02, 0x00, 0xe3, 0xf5
#define TTS_CHAR_RX_UUID       0xab, 0x62, 0xec, 0x32, 0x2e, 0x3d, 0x8a, 0x8e, 0x53, 0x42, 0x51, 0xe7, 0x03, 0x00, 0xe3, 0xf5

#define TTS_SERVICE_CHAR_VAL_WRITE_IDX          0x02
#define TTS_SERVICE_CHAR_VAL_CCCD_IDX           0x03
#define TTS_SERVICE_CHAR_RX_WRITE_IDX           0x05
#define TTS_SERVICE_CHAR_TX_NOITFY_IDX          0x07
#define TTS_SERVICE_CHAR_TX_NOTIFY_CCCD_IDX     0x08 

#define TTS_WRITE_VAL               1
#define TTS_WRITE_RX                2 

#define TTS_NOTIFY_VAL_ENABLE       1
#define TTS_NOTIFY_VAL_DISABLE      2 
#define TTS_NOTIFY_TX_ENABLE        3
#define TTS_NOTIFY_TX_DISABLE       3 

typedef struct
{
    uint8_t  write_type;
    uint16_t len;
    uint8_t *p_value;
} TTS_WRITE_MSG; 

typedef union
{
    uint8_t  notification_index;
    TTS_WRITE_MSG write; 
} TTS_WRITE_MSG_DATA;

typedef struct _T_TTS_CALLBACK_DATA
{
    uint8_t conn_id; 
    T_SERVICE_CALLBACK_TYPE msg_type;
    TTS_WRITE_MSG_DATA msg_data; 
} T_TTS_CALLBACK_DATA;


bool tts_send_val_data( uint8_t conn_id, T_SERVER_ID service_id, void *p_value, uint16_t length);

bool tts_send_tx_data( uint8_t conn_id, T_SERVER_ID service_id, void *p_value, uint16_t length); 


uint8_t tts_svc_add_service(void *p_func);


#ifdef __cplusplus
}
#endif

#endif 
